<?php
/**
 * Template Name: Startsida
 * Description: Startsidan används endast av hemsidan startsida.
 *
 * @package WordPress
 * @subpackage amk
 * @since amk 1.0
 */

    get_header();

    $args = array(
        'post_type' => 'annonsyta',
        'posts_per_page' => 1,
        'meta_key' => 'storannons_key',
        'meta_value' => 'Ja',
        'orderby' => 'date',
        'order' => 'DESC'
    );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
?>
        <div id="big_banner" class="clearfix">
            <div class="half">
                <h1><?php the_title(); ?></h1>
                <?php the_content(); ?>
            </div>
            <div class="half right">
                <div class="img_holder">
                    <?php the_post_thumbnail(); ?>
                </div>
            </div>
        </div>
        <div class="horizontal_divider"></div>
        <div id="small_banners" class="clearfix">
<?php
    endwhile;

    $args = array(
        'post_type' => 'annonsyta',
        'posts_per_page' => 3,
        'meta_key' => 'storannons_key',
        'meta_value' => 'Nej',
        'orderby' => 'date',
        'order' => 'DESC'
    );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
?>
            <div class="small_banner clearfix">
                <?php the_post_thumbnail(); ?>
                <div class="text_holder">
                    <h2><?php the_title(); ?></h2>
                    <?php the_content(); ?>
                </div>
            </div>
<?php
    endwhile;
?>
        </div>
        <div id="calendar">
            <h2>Kalender</h2>
<?php
            print_agenda("complete", 10);
?>
        </div>



<?php
    get_footer();
?>